/**
 *
 */
package edu.cmu.ece.ds.droidchat.message;

import java.io.Serializable;
import java.math.BigInteger;
import java.security.spec.RSAPublicKeySpec;

/**
 * @author Owner
 *
 */
public class ClientPublicKeyMessage extends DroidChatMessage implements
		Serializable {
	/**
	 *
	 */
	private static final long serialVersionUID = 3140517702830121619L;
	private int login_session_id = 0;
	private BigInteger modulus;
	private BigInteger exponent;

	public ClientPublicKeyMessage(int login_session_id,
			RSAPublicKeySpec publicKey) {
		super(DroidChatMessage.CLIENT_PUBLIC_KEY);
		this.login_session_id = login_session_id;
		this.modulus = publicKey.getModulus();
		this.exponent = publicKey.getPublicExponent();
		// TODO Auto-generated constructor stub
	}

	public int getLogin_session_id() {
		return login_session_id;
	}

	public BigInteger getModulus() {
		return modulus;
	}

	public BigInteger getExponent() {
		return exponent;
	}

	public String toString() {
		return "ClientPublicKeyMessage: exponent=" + this.exponent
				+ " modulus=" + this.modulus;
	}
}
